
LIBNAME=libwdplatform.a

CC := $(CROSSCOMPILE)gcc
AR := $(CROSSCOMPILE)ar

CFLAGS += -I./ -I../libcjson/ -I../libwdbase/include/ \
			-I../libghttp/ -I../libwddial/ -I../libwdcap/include \
			-I../librdkafka/$(HOST)/include -I../libwdudp/

ifeq ($(USE_RDKAFKA),1)
CFLAGS += -DUSE_RDKAFKA
endif

SOURCE=$(wildcard *.c)
OBJS=$(subst .c,.o,$(SOURCE))


all:$(LIBNAME)  

$(LIBNAME): $(OBJS)
	$(AR) rcs $(LIBNAME) $(OBJS)

%.o:%.c
	$(CC) -c $(CFLAGS) $< -o $@ 

clean:
	rm *.o -f;
	rm *.a -f;

.PHONY: clean all 
